Integrand size = 29, antiderivative size = 116 \[ \int (g+h x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=-\frac {B (b c-a d) h n x}{2 b d}-\frac {B (b g-a h)^2 n \log (a+b x)}{2 b^2 h}+\frac {B (d g-c h)^2 n \log (c+d x)}{2 d^2 h}+\frac {(g+h x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{2 h} \]
-1/2*B*(-a*d+b*c)*h*n*x/b/d-1/2*B*(-a*h+b*g)^2*n*ln(b*x+a)/b^2/h+1/2*B*(-c *h+d*g)^2*n*ln(d*x+c)/d^2/h+1/2*(h*x+g)^2*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)) )/h
Time = 0.11 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.07 \[ \int (g+h x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {-a^2 B d^2 h n \log (a+b x)+b B \left (2 a d^2 g+b c (-2 d g+c h)\right ) n \log (c+d x)+b d \left (x (B (-b c+a d) h n+A b d (2 g+h x))+B d (2 a g+b x (2 g+h x)) \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{2 b^2 d^2} \]
(-(a^2*B*d^2*h*n*Log[a + b*x]) + b*B*(2*a*d^2*g + b*c*(-2*d*g + c*h))*n*Lo g[c + d*x] + b*d*(x*(B*(-(b*c) + a*d)*h*n + A*b*d*(2*g + h*x)) + B*d*(2*a* g + b*x*(2*g + h*x))*Log[(e*(a + b*x)^n)/(c + d*x)^n]))/(2*b^2*d^2)
Time = 0.29 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.10, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2948, 93, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (g+h x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right ) \, dx\) |
\(\Big \downarrow \) 2948 |
\(\displaystyle \frac {(g+h x)^2 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{2 h}-\frac {B n (b c-a d) \int \frac {(g+h x)^2}{(a+b x) (c+d x)}dx}{2 h}\) |
\(\Big \downarrow \) 93 |
\(\displaystyle \frac {(g+h x)^2 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{2 h}-\frac {B n (b c-a d) \int \left (\frac {h^2}{b d}+\frac {(b g-a h)^2}{b (b c-a d) (a+b x)}+\frac {(d g-c h)^2}{d (a d-b c) (c+d x)}\right )dx}{2 h}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(g+h x)^2 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{2 h}-\frac {B n (b c-a d) \left (\frac {(b g-a h)^2 \log (a+b x)}{b^2 (b c-a d)}-\frac {(d g-c h)^2 \log (c+d x)}{d^2 (b c-a d)}+\frac {h^2 x}{b d}\right )}{2 h}\) |
-1/2*(B*(b*c - a*d)*n*((h^2*x)/(b*d) + ((b*g - a*h)^2*Log[a + b*x])/(b^2*( b*c - a*d)) - ((d*g - c*h)^2*Log[c + d*x])/(d^2*(b*c - a*d))))/h + ((g + h *x)^2*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n]))/(2*h)
3.3.96.3.1 Defintions of rubi rules used
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Int[ExpandIntegrand[(e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; Fre eQ[{a, b, c, d, e, f}, x] && IntegerQ[p]
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ )]*(B_.))*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(f + g*x)^(m + 1)*( (A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])/(g*(m + 1))), x] - Simp[B*n*((b*c - a*d)/(g*(m + 1))) Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] / ; FreeQ[{a, b, c, d, e, f, g, A, B, m, n}, x] && EqQ[n + mn, 0] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && !(EqQ[m, -2] && IntegerQ[n])
Leaf count of result is larger than twice the leaf count of optimal. \(370\) vs. \(2(108)=216\).
Time = 3.16 (sec) , antiderivative size = 371, normalized size of antiderivative = 3.20
method | result | size |
parallelrisch | \(\frac {-B \ln \left (b x +a \right ) a^{2} d^{2} h n +B \ln \left (b x +a \right ) a b c d h n -2 B \ln \left (d x +c \right ) a b \,d^{2} g n -4 B \ln \left (d x +c \right ) b^{2} c d g n -B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a b c d h +2 B \ln \left (b x +a \right ) b^{2} c d g n -B \,a^{2} d^{2} h n +B \,b^{2} c^{2} h n -A a b c d h +A \,b^{2} d^{2} h \,x^{2}+4 B \ln \left (b x +a \right ) a b \,d^{2} g n +B a b \,d^{2} h n x -B \,b^{2} c d h n x -2 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a b \,d^{2} g -2 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{2} c d g +B \ln \left (d x +c \right ) b^{2} c^{2} h n +B \,x^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{2} d^{2} h +2 B x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{2} d^{2} g +2 A x \,b^{2} d^{2} g -B \ln \left (d x +c \right ) a b c d h n -2 A a b \,d^{2} g -2 A \,b^{2} c d g}{2 b^{2} d^{2}}\) | \(371\) |
risch | \(\text {Expression too large to display}\) | \(839\) |
1/2*(-B*ln(b*x+a)*a^2*d^2*h*n+B*ln(b*x+a)*a*b*c*d*h*n-2*B*ln(d*x+c)*a*b*d^ 2*g*n-4*B*ln(d*x+c)*b^2*c*d*g*n-B*ln(e*(b*x+a)^n/((d*x+c)^n))*a*b*c*d*h+2* B*ln(b*x+a)*b^2*c*d*g*n-B*a^2*d^2*h*n+B*b^2*c^2*h*n-A*a*b*c*d*h+A*b^2*d^2* h*x^2+4*B*ln(b*x+a)*a*b*d^2*g*n+B*a*b*d^2*h*n*x-B*b^2*c*d*h*n*x-2*B*ln(e*( b*x+a)^n/((d*x+c)^n))*a*b*d^2*g-2*B*ln(e*(b*x+a)^n/((d*x+c)^n))*b^2*c*d*g+ B*ln(d*x+c)*b^2*c^2*h*n+B*x^2*ln(e*(b*x+a)^n/((d*x+c)^n))*b^2*d^2*h+2*B*x* ln(e*(b*x+a)^n/((d*x+c)^n))*b^2*d^2*g+2*A*x*b^2*d^2*g-B*ln(d*x+c)*a*b*c*d* h*n-2*A*a*b*d^2*g-2*A*b^2*c*d*g)/b^2/d^2
Time = 0.32 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.66 \[ \int (g+h x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {A b^{2} d^{2} h x^{2} + {\left (2 \, A b^{2} d^{2} g - {\left (B b^{2} c d - B a b d^{2}\right )} h n\right )} x + {\left (B b^{2} d^{2} h n x^{2} + 2 \, B b^{2} d^{2} g n x + {\left (2 \, B a b d^{2} g - B a^{2} d^{2} h\right )} n\right )} \log \left (b x + a\right ) - {\left (B b^{2} d^{2} h n x^{2} + 2 \, B b^{2} d^{2} g n x + {\left (2 \, B b^{2} c d g - B b^{2} c^{2} h\right )} n\right )} \log \left (d x + c\right ) + {\left (B b^{2} d^{2} h x^{2} + 2 \, B b^{2} d^{2} g x\right )} \log \left (e\right )}{2 \, b^{2} d^{2}} \]
1/2*(A*b^2*d^2*h*x^2 + (2*A*b^2*d^2*g - (B*b^2*c*d - B*a*b*d^2)*h*n)*x + ( B*b^2*d^2*h*n*x^2 + 2*B*b^2*d^2*g*n*x + (2*B*a*b*d^2*g - B*a^2*d^2*h)*n)*l og(b*x + a) - (B*b^2*d^2*h*n*x^2 + 2*B*b^2*d^2*g*n*x + (2*B*b^2*c*d*g - B* b^2*c^2*h)*n)*log(d*x + c) + (B*b^2*d^2*h*x^2 + 2*B*b^2*d^2*g*x)*log(e))/( b^2*d^2)
Exception generated. \[ \int (g+h x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\text {Exception raised: HeuristicGCDFailed} \]
Time = 0.20 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.33 \[ \int (g+h x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {1}{2} \, B h x^{2} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + \frac {1}{2} \, A h x^{2} + B g x \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A g x + \frac {{\left (\frac {a e n \log \left (b x + a\right )}{b} - \frac {c e n \log \left (d x + c\right )}{d}\right )} B g}{e} - \frac {{\left (\frac {a^{2} e n \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} e n \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c e n - a d e n\right )} x}{b d}\right )} B h}{2 \, e} \]
1/2*B*h*x^2*log((b*x + a)^n*e/(d*x + c)^n) + 1/2*A*h*x^2 + B*g*x*log((b*x + a)^n*e/(d*x + c)^n) + A*g*x + (a*e*n*log(b*x + a)/b - c*e*n*log(d*x + c) /d)*B*g/e - 1/2*(a^2*e*n*log(b*x + a)/b^2 - c^2*e*n*log(d*x + c)/d^2 + (b* c*e*n - a*d*e*n)*x/(b*d))*B*h/e
Time = 2.53 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.32 \[ \int (g+h x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {1}{2} \, {\left (B h \log \left (e\right ) + A h\right )} x^{2} + \frac {1}{2} \, {\left (B h n x^{2} + 2 \, B g n x\right )} \log \left (b x + a\right ) - \frac {1}{2} \, {\left (B h n x^{2} + 2 \, B g n x\right )} \log \left (d x + c\right ) - \frac {{\left (B b c h n - B a d h n - 2 \, B b d g \log \left (e\right ) - 2 \, A b d g\right )} x}{2 \, b d} + \frac {{\left (2 \, B a b g n - B a^{2} h n\right )} \log \left (b x + a\right )}{2 \, b^{2}} - \frac {{\left (2 \, B c d g n - B c^{2} h n\right )} \log \left (-d x - c\right )}{2 \, d^{2}} \]
1/2*(B*h*log(e) + A*h)*x^2 + 1/2*(B*h*n*x^2 + 2*B*g*n*x)*log(b*x + a) - 1/ 2*(B*h*n*x^2 + 2*B*g*n*x)*log(d*x + c) - 1/2*(B*b*c*h*n - B*a*d*h*n - 2*B* b*d*g*log(e) - 2*A*b*d*g)*x/(b*d) + 1/2*(2*B*a*b*g*n - B*a^2*h*n)*log(b*x + a)/b^2 - 1/2*(2*B*c*d*g*n - B*c^2*h*n)*log(-d*x - c)/d^2
Time = 1.03 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.33 \[ \int (g+h x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\,\left (\frac {B\,h\,x^2}{2}+B\,g\,x\right )+x\,\left (\frac {2\,A\,a\,d\,h+2\,A\,b\,c\,h+2\,A\,b\,d\,g+B\,a\,d\,h\,n-B\,b\,c\,h\,n}{2\,b\,d}-\frac {A\,h\,\left (2\,a\,d+2\,b\,c\right )}{2\,b\,d}\right )-\frac {\ln \left (a+b\,x\right )\,\left (B\,a^2\,h\,n-2\,B\,a\,b\,g\,n\right )}{2\,b^2}+\frac {\ln \left (c+d\,x\right )\,\left (B\,c^2\,h\,n-2\,B\,c\,d\,g\,n\right )}{2\,d^2}+\frac {A\,h\,x^2}{2} \]